<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:o="http://omnifaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:sec="http://www.springframework.org/security/facelets/tags">
<f:view contentType="text/html">
	<style>
body {
	background: url(#{request.contextPath}/include/images/admin/login-bg.png);
	font-size: 12px;
}
</style>
	<ui:param name="servletPath"
		value="#{requestScope['javax.servlet.forward.servlet_path']}"></ui:param>
	<ui:param name="path" value="#{request.contextPath}"></ui:param>

	<h:head>
		<f:facet name="first">
			<meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
			<title>我要吃饭</title>
		</f:facet>

		<link type="text/css" rel="stylesheet"
			href="#{request.contextPath}/include/css/default.css" />
		<link type="text/css" rel="stylesheet"
			href="#{request.contextPath}/include/css/admin.css" />
		<script type="text/javascript" charset="utf-8">
			window.CONTEXT_PATH = "#{request.contextPath}";
		</script>
		<script type="text/javascript" charset="utf-8"
			src="#{request.contextPath}/include/js/ueditor1_3_6-utf8-jsp/ueditor.config.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="#{request.contextPath}/include/js/ueditor1_3_6-utf8-jsp/ueditor.all.min.js"></script>
		<script
			src="#{request.contextPath}/include/js/datepicker-primefaces.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="#{request.contextPath}/include/js/fileupload.ori.js"></script>
		<link rel="stylesheet" type="text/css"
			href="#{request.contextPath}/include/css/fileupload.ori.css" />
			
			
		<link href="#{request.contextPath}/include/images/admin/favicon.png"
			type="image/x-icon" rel="shortcut icon" />

		<script type="text/javascript" charset="utf-8"
			src="#{request.contextPath}/include/js/jquery.artDialog.js?skin=blue"></script>


		<ui:insert name="head"></ui:insert>

		<script type="text/javascript">
			$(function() {

				var currentUrl = window.location.pathname
						+ window.location.search;
				$("#sidebar li a[href='" + currentUrl + "']").addClass(
						"ui-state-highlight");
				//.addClass("ui-state-highlight"); li a [href=/jdp2p4/admin/loan/loanList.htm?loanStatus=WAITING_VERIFY]
				//alert($("#sidebar li a[href='"+currentUrl+"']").size());
				// 增加表格行鼠标经过样式
				$(".ui-datatable-data tr").mouseover(function() {
					$(this).addClass("ui-state-hover");
				});
				$(".ui-datatable-data tr").mouseout(function() {
					$(this).removeClass("ui-state-hover");
				});
				//ui-state-hover  border-left: solid 5px #c0c0c0;
			});
		</script>
		<style>
#sidebar li {
	height: 20px;
	font-weight: bold;
	border-bottom: solid 1px #c0c0c0;
	color: #878787;
	font-family: "微软雅黑";
}

.ui-panelmenu .ui-menuitem {
	width: 99%;
}
</style>
	</h:head>

	<h:body>
		<div id="page" class="ui-widget">

			<div id="content">
				<div class="post">
					<ui:insert name="content">...</ui:insert>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>


		<ui:insert name="status">
			<p:ajaxStatus
				style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">
				<f:facet name="start">
					<p:graphicImage value="/include/images/loading.gif" />
				</f:facet>

				<f:facet name="complete">
					<h:outputText value="" />
				</f:facet>
			</p:ajaxStatus>
		</ui:insert>
		<h:form>
			<p:poll interval="10" oncomplete="initNoticeDialog()"
				rendered="#{configHome.getConfigValue('admin_notice') eq '1'}"
				process="@this" update=":notice" global="false" />
		</h:form>
		<h:panelGroup id="notice">
			<ui:repeat var="n" value="#{noticeHome.noticePool.list}">
				<h:outputText value="#{n.message}"></h:outputText>
				<br />
			</ui:repeat>
		</h:panelGroup>
		<script>
			//<![CDATA[
			function initNoticeDialog() {
				if ($('#notice').html()) {
					art.dialog({
						id : 'msg',
						content : document.getElementById('notice'),
						width : 320,
						height : 240,
						left : '100%',
						top : '100%',
						fixed : true,
						drag : false,
						resize : false,
						init : function() {
							var that = this, i = 5;
							var fn = function() {
								that.title('通知(' + i + ')');
								!i && that.close();
								i--;
							};
							timer = setInterval(fn, 1000);
							fn();
						},
						close : function() {
							clearInterval(timer);
						}
					})
				}
			}

			initNoticeDialog();
			//]]>
		</script>
	</h:body>

</f:view>
</html>